package com.chh.nonstandardjson;

import java.io.IOException;
import java.io.Reader;

public class JsonStringReader {
    private String str;
    private int length;
    private int next = 0;

    public JsonStringReader(String s) {
        this.str = s;
        this.length = s.length();
    }

    public int read() {
        if (next >= length)
            return -1;
        return str.charAt(next++);
    }
}
